#include "shdevice.h"
#include "sh/shnet.h"
#include "converter.h"
#include <QDebug>

ShDevice::ShDevice(QObject *parent) :
    QObject(parent)
{
    m_sh = new ShNet(this);
    if (!m_sh->join(QHostAddress("192.168.7.7"),
                    QHostAddress("239.1.1.1"), 45454, "projector_screen")) {
        qWarning() << "sh join failed :(";
        return;
    }

    m_converter = new Converter(QHostAddress("192.168.7.78"), 7712, this);
    m_sh->addProperty("state", false, m_converter, "state");
}
